//package com.sinothk.special.im.service.impl;
//
//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
//import com.baomidou.mybatisplus.core.metadata.IPage;
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
//import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
//import com.sinothk.special.im.entity.MessageAll;
//import com.sinothk.special.im.mapper.MessageAllMapper;
//import com.sinothk.special.im.service.IMessageAllService;
//import org.apache.shiro.SecurityUtils;
//import org.jeecg.common.system.vo.LoginUser;
//import org.springframework.stereotype.Service;
//
///**
// * @Description: 消息中心-所有消息
// * @Author: Liangyt
// * @Date: 2022-01-24
// * @Version: V1.0
// */
//@Service
//public class MessageAllServiceImpl extends ServiceImpl<MessageAllMapper, MessageAll> implements IMessageAllService {
//
//    @Override
//    public IPage<MessageAll> listForCurrUser(String receiveUserId, Integer pageNo, Integer pageSize) {
//        LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//
//        LambdaQueryWrapper<MessageAll> queryWrapper = new LambdaQueryWrapper<>(); // todo
////        queryWrapper.and(subWrapper -> {
////            subWrapper.eq(MessageAll::getSendUserId, loginUser.getId()).eq(MessageAll::getReceiveUserId, receiveUserId);
////        });
////        queryWrapper.or();
////        queryWrapper.and(subWrapper -> {
////            subWrapper.eq(MessageAll::getSendUserId, receiveUserId).eq(MessageAll::getReceiveUserId, loginUser.getId());
////        });
////        queryWrapper.orderByAsc(MessageAll::getCreateTime);
//
//        Page<MessageAll> page = new Page<>(pageNo, pageSize);
//        return this.page(page, queryWrapper);
//    }
//}
